<!--
*  功能描述：绩效管理：年度总奖金
 -->
 <template>
  <div>
    <div>
      <el-descriptions title="部门奖金计算" :column="2" border>
      </el-descriptions>
      <el-form :inline="true" class="demo-form-inline">
        <el-form-item label="部门名称">
          <el-select v-model="DeptId" placeholder="请选择">
            <el-option v-for="item in DeptData1" :key="item.DepId" :label="item.DepName" :value="item.DepId">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary" @click="show">查询</el-button>
        </el-form-item>
      </el-form>
    </div>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="DepName" label="部门名称">
      </el-table-column>
      <el-table-column prop="AnnName" label="姓名">
      </el-table-column>
      <el-table-column prop="AnnStart" label="职位状态">
        <template slot-scope="scope">
          <span v-if="scope.row.AnnStart==1">在职</span>
          <span v-else>离职</span>
        </template>
      </el-table-column>
      <el-table-column prop="AnnDepartment" label="部门经理调整">
      </el-table-column>
      <el-table-column prop="AnnCompany" label="公司调整">
      </el-table-column>
      <el-table-column prop="AnnCalculated" label="项目奖金计算值">
      </el-table-column>
      <el-table-column prop="AnnBonus" label="部门内奖金计算值">
      </el-table-column>
      <el-table-column prop="AnnProject" label="项目奖金">
      </el-table-column>
      <el-table-column prop="AnnBonuswithin" label="部门内奖金">
      </el-table-column>
      <el-table-column prop="AnnManagement" label="项目管理奖">
      </el-table-column>
      <el-table-column prop="AnnExcellent" label="优秀员工奖">
      </el-table-column>
      <el-table-column prop="AnnOutstanding" label="突出贡献奖">
      </el-table-column>
      <el-table-column prop="AnnBim" label="BIM及标准化">
      </el-table-column>
      <el-table-column prop="AnnRegistration" label="注册费用">
      </el-table-column>
      <el-table-column prop="AnnTrade" label="工会补助">
      </el-table-column>
      <el-table-column prop="Anntotal1" label="合计（含预发）">
      </el-table-column>
      <el-table-column prop="AnnAdvance" label="预发奖金">
      </el-table-column>
      <el-table-column prop="Anntotal2" label="合计">
      </el-table-column>
    </el-table>
  </div>
</template>

  <script>
export default {
  data () {
    return {
      tableData: [],
      DeptId: null,
      DeptData: [],
      DeptData1: [],
    }
  },
  methods: {
    show () {
      var id = this.$route.params.id;
      this.$http({
        url: 'AssBonu/GetViewAnnDepList',
        method: 'get',
        params: {
          DepId: this.DeptId,
          AssId: id,
        }
      })
        .then(res => {
          this.tableData = res.data
        })
    },
    showMent () {//任务下拉
      this.$http({
        url: 'AssProjectA/GetAssessmentList',
        method: 'get',
      })
        .then(res => {
          this.DeptData = res.data
        })
    },
    showDept () {
      this.$http({
        url: 'AssBonu/GetDepartments',
        method: 'get',
      })
        .then(res => {
          this.DeptData1 = res.data
        })
    }
  },
  mounted () {
    this.show();
    this.showDept();
  }
}
  </script>